<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.itheima.service.AdminService"%>
<%@page import="com.itheima.service.AdminServiceImpl"%>
<%@page import="java.util.List"%>
<%@page import="com.itheima.core.po.User"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="UTF-8"/>
    <title>管理员页面</title>
    <link rel="stylesheet" type="text/css" href="css/common.css"/>
    <link rel="stylesheet" type="text/css" href="css/main.css"/>
    <Script>
    function delete1()
    {
     document.form1.action="${pageContext.request.contextPath}/deleteusermassages.action";
     document.form1.submit();
    }
    
    function change1()
    {
     document.form1.action="${pageContext.request.contextPath}/tochangeusermassages.action";
     document.form1.submit();
    }

    function form3()
    {
     document.form1.action="${pageContext.request.contextPath}/tonewuser.action";
     document.form1.submit();
    }
    </Script>
</head>
<body>

<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="topbar-logo-wrap clearfix">

            <ul class="navbar-list clearfix">
                <li><a class="on" href="${pageContext.request.contextPath}/to_admin.action">首页</a></li>
            </ul>
        </div>
        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
                <li><a href="${pageContext.request.contextPath}/logout.action">退出登陆</a></li>
            </ul>
        </div>
        
    </div>
</div>
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <div class="sidebar-content">
            <ul class="sidebar-list">
                <li>
                    <a href="#"><i class="icon-font">&#xe003;</i>管理员操作</a>
                    <ul class="sub-menu">
                        <li><a href="${pageContext.request.contextPath}/to_admin.action"><i class="icon-font">&#xe005;</i>返回</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <!--/sidebar-->
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font">&#xe06b;</i><span>欢迎使用管理员系统。</span></div>
        </div>
       
        <div class="result-wrap">
            <div class="result-title">
                <h1>用户基本信息</h1>
                <input type="submit" name="submit3" tabindex="3" value="新建" class="btn btn-primary" onClick="form3()"/>
            </div>
            <div class="xia1">
				<table border="4px">
					<tr>
						<th>用户id</th>
						<th>用户账号</th>
						<th>用户姓名</th>
						<th>用户密码</th>
						<th>用户手机号</th>
						<th>旅游地点</th>
						<th>旅游票数</th>
					</tr>
					<%
			      		List<User> users = (List)session.getAttribute("users");
						for (User user : users) {
					%>
					<tr>
						<td style="width:200px;"><%=user.getUser_id()%></td>
						<td style="width:200px;"><%=user.getUser_zhanghao()%></td>
						<td style="width:200px;"><%=user.getUser_name()%></td>
						<td style="width:200px;"><%=user.getUser_password()%></td>
						<td style="width:200px;"><%=user.getUser_phone()%></td>
						<td style="width:200px;"><%=user.getUser_place()%></td>
						<td style="width:200px;"><%=user.getUser_piaonums()%></td>
				   </tr>
					<%
						}
					%>
				</table>	
			</div>
			   <br>
			   <p>输入用户id修改信息:</p>
			         <form name="form1" action="" method="post">
			                <input type="text" name="user_id"  id="user_id" size="15" class="admin_input_style" />
			                <input type="submit" name="submit1" tabindex="3" value="删除" class="btn btn-primary" onClick="delete1()"/>
			                <input type="submit" name="submit2" tabindex="3" value="修改" class="btn btn-primary" onClick="change1()"/>
			                <span id="message" style="color:#F00">${msg}</span>
                     </form>
        </div>
        <div class="result-wrap"> 	    
            <div class="result-title">
                <h1>使用帮助</h1>
            </div>
            <div class="result-content">
                <ul class="sys-info-list">
                    <li>
                        <label class="res-lab">更多详细信息：</label><span class="res-info"><a href="http://www.lmonkey.com/" target="_blank">旅游者联盟</a></span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</body>
</html>